#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QAudioOutput>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QFile>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void playIndx(int index);

private slots:

    void on_listWidget_doubleClicked(const QModelIndex &index);

    void on_openDirBtn_clicked();

    void on_preSongBtn_clicked();

    void on_playBtn_clicked();

    void on_stopBtn_clicked();

    void on_nextSongBtn_clicked();

    void on_volumeSlider_sliderMoved(int position);

private:
    Ui::Widget *ui;
    QString dir;
    QMediaPlayer *mediaPlayer;
    int playIndex;

};
#endif // WIDGET_H
